Skip to content

Conversation

@Rajanna-Karthik
Copy link
Contributor

Summary

Implements ATX FES (Amazon Transform Frontend Service) integration to support Transform profiles alongside existing Q Developer profiles.

Changes

  • Add ATX FES authentication with bearer tokens via AtxTokenServiceManager
  • Implement ATXTransformHandler for ATX FES API calls (ListAvailableProfiles)
  • Add AtxNetTransformServer for Transform-specific LSP commands
  • Create TransformConfigurationServer for "aws.transformProfiles" configuration section
  • Add dual-flow architecture: RTS for Q Developer, ATX FES for Transform
  • Include ATX FES client dependency in core/atx-fes-client/ following repo patterns

Architecture

  • Q Developer profiles → RTS backend (existing flow)
  • Transform profiles → ATX FES backend (new flow)
  • Configuration routing via "aws.q" vs "aws.transformProfiles" sections

Dependencies

  • Added @amazon/elastic-gumby-frontend-client in core/atx-fes-client/
  • Updated bundleDependencies to include ATX FES client
  • Updated package.json and package-lock.json with core/ path reference

Testing

  • ✅ Profile discovery from ATX FES gamma environment
  • ✅ Bearer token authentication and API integration
  • ✅ Configuration routing between RTS and ATX FES flows
  • ✅ Local builds (compile and package) successful

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Rajanna-Karthik Rajanna-Karthik requested a review from a team as a code owner October 23, 2025 09:44
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 15.81509% with 692 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.09%. Comparing base (bf9f997) to head (d80d7d7).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...rver/configuration/transformConfigurationServer.ts 29.07% 200 Missing ⚠️
...anguage-server/netTransform/atxTransformHandler.ts 0.00% 185 Missing ⚠️
...ared/amazonQServiceManager/atxTransformProfiles.ts 0.00% 150 Missing ⚠️
...guage-server/netTransform/atxNetTransformServer.ts 0.00% 93 Missing ⚠️
...ed/amazonQServiceManager/AtxTokenServiceManager.ts 44.30% 44 Missing ⚠️
.../aws-lsp-codewhisperer/src/shared/amazonQServer.ts 6.66% 14 Missing ⚠️
...r/aws-lsp-codewhisperer/src/shared/proxy-server.ts 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2439      +/-   ##
==========================================
- Coverage   62.42%   62.09%   -0.33%     
==========================================
  Files         266      271       +5     
  Lines       59107    60507    +1400     
  Branches     3790     3841      +51     
==========================================
+ Hits        36895    37574     +679     
- Misses      22137    22857     +720     
- Partials       75       76       +1     
Flag Coverage Δ
unittests 62.09% <15.81%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


// Initialize ATX FES client
this.atxClient = new ElasticGumbyFrontendClient({
region: 'us-east-1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this region be dynamic? for example- if user has profile in FRA do we override client region somewhere else?


return true
} catch (error) {
this.logging.error(`TransformConfigurationServer: Failed to initialize ATX client: ${error}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets log url and region also here. in case of errors, it will help us investigate


return transformProfiles
} catch (error) {
this.logging.error(`TransformConfigurationServer: ListAvailableProfiles failed: ${error}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be warning?

const endpoint = process.env.TCP_ENDPOINT || DEFAULT_ATX_FES_ENDPOINT_URL

this.atxClient = new ElasticGumbyFrontendClient({
region: 'us-east-1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be dynamic? or if we need us-east-1 only, can we please create constant for that and use it here.


return true
} catch (error) {
this.logging.log(`ATX FES Client: Failed to initialize: ${error}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets log region and end point here

*/
private async addAuthToCommand(command: any): Promise<void> {
if (!this.serviceManager.isReady()) {
throw new Error('ATX Token Service Manager not ready')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is user facing error, lets reword it with customer facing verbs

result.forEach((settledResult, index) => {
const [region, endpoint] = Array.from(endpoints.entries())[index]
if (settledResult.status === 'fulfilled') {
const profiles = settledResult.value
Copy link
Contributor

@pranav-firake pranav-firake Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are not using this profiles value anywhere. can we delete this?

/**
* Clear cached applicationUrl (for token refresh scenarios)
*/
clearApplicationUrlCache(): void {
Copy link
Contributor

@pranav-firake pranav-firake Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is never called. for new config we should clear cache.


export const TransformConfigurationServerTokenProxy = TransformConfigurationServerToken()

export const ATXHandlerServerTokenProxy = AtxNetTransformServerToken()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is same as AtxNetTransformServerTokenProxy() can we remove duplicate

Server,
} from '@aws/language-server-runtimes/server-interface'
import { AtxTokenServiceManager } from '../../shared/amazonQServiceManager/AtxTokenServiceManager'
import { ATXTransformHandler } from './atxTransformHandler'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:nit non-blocking. some variables use Atx and some use ATX. can we use only one convention

export const ATX_FES_ENDPOINTS = new Map([['us-east-1', 'https://api.transform-gamma.us-east-1.on.aws/']])

export const DEFAULT_ATX_FES_ENDPOINT_URL = 'https://api.transform-gamma.us-east-1.on.aws/'
export const DEFAULT_ATX_FES_REGION = 'us-east-1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are not using this, can we update string usage of us-east-1 to this?

@@ -0,0 +1,93 @@
import {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add unit tests for this new class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants